package actions;

import gui.Frame;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;


/**
 * An action that will display the logged in
 * park managers pending jobs when it is 
 * sent an action event. 
 * 
 * @author Natalie
 *
 */
@SuppressWarnings("serial")
public class ViewPendingJobsAction extends AbstractAction {
	
	private Frame myFrame;
	
	public ViewPendingJobsAction(final Frame theFrame) {
		super("View My Pending Jobs");
		myFrame = theFrame;
	}
	
	/**
	 * Sets the previous action the user took, and displays all of their pending jobs. 
	 */
	@Override
	public void actionPerformed(ActionEvent theEvent) {
		myFrame.setPreviousAction(new HomeAction(myFrame));
		myFrame.displayPendingJobs();
	}

	
}

